package com.pet.item.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.pet.api.dto.ItemDTO;
import com.pet.api.dto.OrderDetailDTO;
import com.pet.common.domain.PageDTO;
import com.pet.common.domain.Result;
import com.pet.item.domain.po.Item;
import com.pet.item.domain.query.ItemQuery;
import com.pet.item.domain.vo.ItemDetailVO;

import java.util.List;

/**
 * <p>
 * 商品表 服务类
 * </p>
 *
 * @author Cookies
 * @since 2024-07-03
 */
public interface IItemService extends IService<Item> {

    PageDTO<ItemDetailVO> getItemsListByStoreId(ItemQuery itemQuery);

    PageDTO<ItemDetailVO> getHotItems();

    boolean addItem(Item item);

    List<ItemDTO> getItemByIds(List<Integer> ids);

    List<ItemDetailVO> getItemsListByCategory(String category);

    void deductStock(List<OrderDetailDTO> items);

    void appendStock(List<OrderDetailDTO> items);

    ItemDTO queryItemById(Integer id);

    Result getRecommendItems(Integer current);
}
